package uml;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author sunqiyuan
 * @Classname AAA
 * @Description TODO
 * @Date 2020-07-23 14:04
 * @Version V1.0
 */
public interface AAA {

    int flags = 0;

    public void hello();

    abstract class AbstractBase implements AAA {
        /**
         * {@inheritDoc}
         */
        @Override
        public void hello() {

        }
    }

    /**
     * donothing
     */
    public static class NoOp extends AbstractBase {
        @Override
        public void hello() {
            super.hello();
        }
    }

    public static class ForSpecial extends AbstractBase {
        @Override
        public void hello() {
            super.hello();
        }
    }

    public static class Compound extends AbstractBase {
        // map Map<String, interfaceStard> interfaceStardMap =new HashMap<>();
        List<interfaceStard> interfaceStardList = new ArrayList<>();

        public void add(interfaceStard single) {
            interfaceStardList.add(single);
        }

        @Override
        public void hello() {
            if (interfaceStardList.isEmpty()) {
                // todo default
            } else {
                for (interfaceStard e : interfaceStardList) {
                    e.hello();
                    // todo special
                }
            }
        }
    }

    enum NoOp_1 implements AAA {

        /**
         * The singleton instance.
         */
        INTANCE;

        @Override
        public void hello() {

        }
    }
}
